package request

import (
	"github.com/gin-gonic/gin"
	"strconv"
)

type PageParam struct {
	PageSize int
	PageNum  int
}

func GetPageParam(c *gin.Context) *PageParam {
	pageSize, _ := strconv.Atoi(c.DefaultQuery("pageSize", "10"))
	pageNum, _ := strconv.Atoi(c.DefaultQuery("pageNum", "1"))
	return &PageParam{
		PageSize: pageSize,
		PageNum:  pageNum,
	}
}
